﻿Public Class frmMain
    Public delclose As delClose
    Private _tendangnhap As String
    Private obj As New ThuVien
    Public Property Tendangnhap()
        Get
            Return _tendangnhap
        End Get
        Set(ByVal value)
            _tendangnhap = value
        End Set
    End Property
    Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub


   
    Private Sub btnHangHoa_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHangHoa.Click
        obj.HThiFormCon(Me, frmHangHoa)
    End Sub

    Private Sub btnKhachHang_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnKhachHang.Click
        obj.HThiFormCon(Me, frmKhachHang)
    End Sub

    Private Sub btnNhaCC_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNhaCC.Click
        obj.HThiFormCon(Me, frmNhaCC)
    End Sub

    Private Sub btnNhapHang_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNhapHang.Click
        obj.HThiFormCon(Me, frmNhanHang)
    End Sub

    Private Sub btnXuatHang_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnXuatHang.Click
        obj.HThiFormCon(Me, frmXuatHang)
    End Sub

    Private Sub btnDatHang_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDatHang.Click
        obj.HThiFormCon(Me, frmDatHang)
    End Sub

    Private Sub btnThuChi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnThuChi.Click
        obj.HThiFormCon(Me, frmThuChi)
    End Sub

    Private Sub btnTimKiem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTimKiem.Click
        obj.HThiFormCon(Me, frmTimKiem)
    End Sub

    Private Sub btnDoiMatKhau_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDoiMatKhau.Click

    End Sub

    Private Sub btnThoat_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnThoat.Click
        Me.Close()
    End Sub

    Private Sub frmMain_FormClosed(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles MyBase.FormClosed
        delclose.Invoke(sender, e)
    End Sub

    
    Private Sub btnCascade_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCascade.Click
        Me.LayoutMdi(MdiLayout.Cascade)
    End Sub

    Private Sub btnvertical_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnvertical.Click
        Me.LayoutMdi(MdiLayout.TileVertical)
    End Sub

    Private Sub btnhorizontal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnhorizontal.Click
        Me.LayoutMdi(MdiLayout.TileHorizontal)
    End Sub

    Private Sub ButtonItem17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem17.Click

        For Each childform As Form In Me.MdiChildren
            childform.Close()
        Next
    End Sub
End Class
